package es.ats.codington.festival.Mapper;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import es.ats.codington.festival.domain.Place;


public class PlaceMapper implements RowMapper<Place>{
	@Override
	public Place mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Place place = new Place();
			
			place.setName(resultSet.getString("name"));
			place.setiDplace(resultSet.getInt("idplace"));
			place.setAddress(resultSet.getString("address"));
			place.setCapacity(resultSet.getInt("capacity"));
			place.setTown(resultSet.getString("town"));
			place.setDescription(resultSet.getString("description"));
			place.setType(resultSet.getString("type"));
			
		return place;
	}


}
